
import java.sql.*;
public class disan{
	public static void main(String args[]){
		Connection con;
		Statement sql;
		ResultSet rs;
		con =disi.connectDB("16012012","root","111111");
		if(con ==null)return;
		String jiLu="('1004','王三','2000-10-23',1.66)"+"('1005','李四','2001-10-23',1.76)";
		String sqlStr ="insert into students values"+jiLu;
		try{
			sql = con.createStatement();
			sql.executeUpdate(sqlStr);
			rs=sql.executeQuery("SELECT * FROM students");
		   while(rs.next()){
				String number=rs.getString(1);
				String name=rs.getString(2);
				Date data=rs.getDate(3);
				float  height=rs.getFloat(4);
				System.out.print(number);
				System.out.print(name);
				System.out.print(data);
				System.out.print(height);
				}
//			else{
//				System.out.print("没有记录：");
//			}
			con.close();
		}
		catch(SQLException e){
			System.out.println("记录中number值不能重复"+e);
		}
		
	}
	}